﻿using System;
using System.Collections.Generic;
using System.Text;
using Cashier_Utils;

namespace Cashier_Model
{
    [Table(Tablename = "bill_purchase")]
    public class BillPurchase: BaseModel
    {
        private Int64 id;

        [Table(Columnname="id", Columntype="bigint", Iskey=true, Iscondition=true, Isdeletefield=true)]
        public Int64 Id
        {
            get { return id; }
            set { id = value; }
        }

        private String enterpriseNo;

        [Table(Columnname = "enterprise_no", Columntype = "varchar", Iscondition = true, Isdeletefield = true)]
        public String EnterpriseNo
        {
            get { return enterpriseNo; }
            set { enterpriseNo = value; }
        }

        private String storeNo;

        [Table(Columnname = "store_no", Columntype = "varchar", Iscondition = true)]
        public String StoreNo
        {
            get { return storeNo; }
            set { storeNo = value; }
        }

        private String purchaseNo;

        [Table(Columnname = "purchase_no", Columntype="varchar", Iscondition=true, Isdeletefield=true)]
        public String PurchaseNo
        {
            get { return purchaseNo; }
            set { purchaseNo = value; }
        }

        private Int32 numbers;

        [Table(Columnname = "numbers", Columntype="int", Isupdatefield=true)]
        public Int32 Numbers
        {
            get { return numbers; }
            set { numbers = value; }
        }

        private Decimal goodsTotal;

        [Table(Columnname = "goods_total", Columntype="decimal", Isupdatefield=true)]
        public Decimal GoodsTotal
        {
            get { return goodsTotal; }
            set { goodsTotal = value; }
        }

        private Decimal purchaseTotal;

        [Table(Columnname = "purchase_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal PurchaseTotal
        {
            get { return purchaseTotal; }
            set { purchaseTotal = value; }
        }

        private Decimal discountTotal;

        [Table(Columnname = "discount_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal DiscountTotal
        {
            get { return discountTotal; }
            set { discountTotal = value; }
        }

        private Decimal fare;

        [Table(Columnname = "fare", Columntype = "decimal", Isupdatefield = true)]
        public Decimal Fare
        {
            get { return fare; }
            set { fare = value; }
        }

        private Decimal otherCost;

        [Table(Columnname = "other_cost", Columntype = "decimal", Isupdatefield = true)]
        public Decimal OtherCost
        {
            get { return otherCost; }
            set { otherCost = value; }
        }

        private Decimal countTotal;

        [Table(Columnname = "count_total", Columntype = "decimal", Isupdatefield = true)]
        public Decimal CountTotal
        {
            get { return countTotal; }
            set { countTotal = value; }
        }

        private DateTime purchaseDate;

        [Table(Columnname = "purchase_date", Columntype="datetime")]
        public DateTime PurchaseDate
        {
            get { return purchaseDate; }
            set { purchaseDate = value; }
        }

        private String note;

        [Table(Columnname = "note", Columntype = "varchar", Isupdatefield=true)]
        public String Note
        {
            get { return note; }
            set { note = value; }
        }

        private Decimal debtAmount;

        [Table(Columnname = "debt_amount", Columntype = "decimal", Iscondition = true, Conditiontype = ConditionType.GREATER, Isupdatefield = true)]
        public Decimal DebtAmount
        {
            get { return debtAmount; }
            set { debtAmount = value; }
        }

        private String supplierNo;

        [Table(Columnname="supplier_no", Columntype="varchar", Iscondition=true, Isupdatefield=true)]
        public String SupplierNo
        {
            get { return supplierNo; }
            set { supplierNo = value; }
        }

        private String supplierName;

        [Table(Columnname = "supplier_name", Columntype = "varchar", Isupdatefield = true)]
        public String SupplierName
        {
            get { return supplierName; }
            set { supplierName = value; }
        }

        private String adminUsername;

        [Table(Columnname = "admin_username", Columntype = "varchar", Iscondition = true)]
        public String AdminUsername
        {
            get { return adminUsername; }
            set { adminUsername = value; }
        }

        private String adminName;

        [Table(Columnname = "admin_name", Columntype = "varchar", Iscondition = true)]
        public String AdminName
        {
            get { return adminName; }
            set { adminName = value; }
        }
        
        private DateTime createtime;

        [Table(Columnname = "createtime", Columntype = "datetime")]
        public DateTime Createtime
        {
            get { return createtime; }
            set { createtime = value; }
        }

        private String startDate;

        public String StartDate
        {
            get { return startDate; }
            set { startDate = value; }
        }

        private String endDate;

        public String EndDate
        {
            get { return endDate; }
            set { endDate = value; }
        }
    }
}
